<div class="path">
    <i class="iconfont icon-shouye1"></i>
    <a href="{url('admin/default/welcome')}">开始</a> / 
    <a href="{url('service/index')}">维修任务</a>
</div>
<div class="table-head fn-clear">
    <div class="fn-l">
        <a href="{url('service/index')}" class="button">
            <i class="iconfont icon-xiangzuo1"></i> 返回
        </a>
    </div>
</div>
<div class="m10">
<form id="form" action="{url('service/edit')}">
<table class="table table-border">
    <tr class="bg-f5">
      <th>跟踪号:</th>
      <td>{$info['number']}</td>
      <th>IMEI号:</th>
      <td>{$info['imei']}</td>
    </tr>
    <tr class="bg-f5">
      <th>厂商:</th>
      <td>{$info['manufacturer_name']}</td>
      <th>机型:</th>
      <td>{$info['producttype_name']}</td>
    </tr>
    <tr class="bg-f5">
      <th>购买日期:</th>
      <td>{if $info['shop_time']}{date('Y-m-d',$info['shop_time'])}{/if}</td>
      <th>维修工程师:</th>
      <td>{$userInfo['username']}</td>
    </tr>
    <tr class="bg-f5">
      <th>是否保内:</th>
      <td>{if $info['overtime'] == '是'}<span class="badge">保内</span>{else}<span class="badge bg-red">过保</span>{/if}</td>
      <th>是否紧急:</th>
      <td>{if $info['is_urgent']}<span class="badge bg-red">加急</span>{else}<span class="badge">普通</span>{/if}</td>
    </tr>
    <tr class="bg-f5">
      <th>客户描述故障:</th>
      <td colspan="3">{$info['fault_why']}</td>
    </tr>  
    <tr>
      <th>检查实际故障:</th>
      <td colspan="3">{$info['failure_cause']}</td>
    </tr>
    <tr>
    <th>选物料:</th>
    <td colspan="3">
      <a title="选择维修使用的物料配件" href="javascript:void(0);" url="{url('service/add_bom',array('id'=>$info['id']))}" class="button button-xifen win">
      <i class="iconfont icon-xiangxia"></i> 选择维修使用的物料配件
      </a>
    </td>
    </tr>
</table>
<div class="table-head fn-clear"> 
    <div class="fn-l">
    使用维修物料
    </div>
    <div class="fn-r">
        <a href="{url('service/edit',['id'=>$id,'is_excel'=>1])}" class="button button-blue">
            <i class="iconfont icon-tianjia"></i> 导出
        </a>
        <a href="{url('service/edit',['id'=>$id,'print'=>1])}" class="button" target="_blank">
            <i class="iconfont icon-dayinji"></i> 打印
        </a>
    </div>    
</div>
<table class="table table-border">
<thead>
    <tr>
        <td class="fn-tac w60">#</td>
        <td>产品名称</td>
        <td class="w100 fn-tac">物料代码</td>
        <td>物料名称</td>
        <td>规格型号</td>
        <td class="fn-tac w60">操作</td>
    </tr>
</thead>
<tbody>
{loop $list $vo}
<tr>
    <td class="fn-tac">{$vo['id']}</td>
    <td>{$vo['product']}</td>
    <td class="fn-tac">{$vo['code']}</td>
    <td>{$vo['name']}</td>
    <td>{$vo['parameter']}</td>
    <td class="fn-tac tip">
    <a href="javascript:void(0);" class="del" title="撤销" url="{url('service/del',array(bom_id=>$vo['bom_id'],id=>$vo['id'],act=>del))}">撤销</a></td>
</tr>
{/loop}
</tbody>
</table>
</div>
<div class="btn fn-tac">
    <a href="{url('service/bom',array('id'=>$id))}" class="button button-blue">
          <i class="iconfont icon-xiangxia"></i> 下一步填写维修信息
    </a>
    <a href="{url('service/index')}" class="button button-yellow">
          <i class="iconfont icon-xiangzuo1"></i> 返回
    </a>
</div>
<script type="text/javascript">
Do('base','form','date','dialog',function(){ 
    $('.win').click(function(){$(this).win();});
    $('.del').click(function(){$(this).del();});
})
</script>